package com.alt.utils;

import com.alt.R;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

public class ALTUserToast
{	
	private ALTUserToast() { }
	
	public static void showToast(Context context, int id) {
		showDefaultToast(context, context.getString(id));
    }
	
	public static void showToast(Context context, String message) {
    	showDefaultToast(context, message);
    }
	
    public static void showDefaultToast(Context context, String message)
    {
    	final View view = LayoutInflater.from(context).inflate(R.layout.toast_default, null);
        ((TextView) view.findViewById(R.id.tv_toast_msg)).setText(message);
        
        Toast toast = new Toast(context);
        // toast.setDuration(Toast.LENGTH_LONG);
        toast.setDuration(Toast.LENGTH_SHORT);
        toast.setView(view);
        // toast.setGravity(Gravity.CENTER_HORIZONTAL|Gravity.CENTER_VERTICAL, 0, 0);
        toast.show();
    }   

}
